﻿using DevExpress.XtraGrid.Demos.util;
using DXApplicationTangche.DTO;
using DXApplicationTangche.UC.订单一览新.订单预览新.service;
using mendian;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DXApplicationTangche.UC.订单.service
{
    public class 订单检索Service
    {
        public List<DTO订单检索条件> DTO订单检索条件s = new List<DTO订单检索条件>();
        public List<OrderCommitDTO返回> OrderCommitDTO返回s = new List<OrderCommitDTO返回>();
        public 订单检索Service()
        {
            this.DTO订单检索条件s = 
                FunctionHelper.JsonDeserialization<List<DTO订单检索条件>>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/barcode/getOrderFullTextQueryDTOAll"
                        )
                    );
        }
        public 订单检索Service(List<DTO订单检索条件> dTOs, String pageNo,String pageSize)
        {
            this.OrderCommitDTO返回s = FunctionHelper.JsonDeserialization<List<OrderCommitDTO返回>>(
                    RestCall.PostHttp(
                        URL.接口url + "/barcode/getOrderCommitDtoByCondition?pageNo=" + pageNo + "&pageSize=" + pageSize,
                            FunctionHelper.JsonSerialization(dTOs)
                            )
                    );
        }
    }
    public class DTO订单检索条件
    {
        public String displayName { get; set; }//  控件显示名称
        public Boolean fuzzyQuery { get; set; }//  是否模糊查询
        public List<String> optionValues { get; set; } = new List<String>();//  对应非模糊查询
        public Boolean queryItemMatch { get; set; }//  该查询项目被命中
        public String queryName { get; set; }//  查询的item，对应elasticsearch的query name
        public String queryText { get; set; }//  查询的value，对应elasticsearch的query text
        public DTO订单检索条件()
        {

        }
    }
    
}
